package carcassonne.game.player;

import carcassonne.game.component.Color;
import carcassonne.lobby.Room;
import carcassonne.server.websocket.WebsocketContext;
import carcassonne.user.UserInfo;
import io.netty.channel.Channel;

import java.util.List;

public class Player {

    public String id;

    public String nickname;

    public int avatar;

    public int sequence;

    public int seat;

    public int color;

    public int role;

    public int team;

    public Channel channel;

    public int status = PlayerStatus.Idle;

    public Player(UserInfo userInfo, int seat, Channel channel, int role) {

        this.id = userInfo.id;
        this.nickname = userInfo.nickname;
        this.avatar = userInfo.avatar;

        this.sequence = seat;
        this.seat = seat;
        this.color = seat;
        this.role = role;

        this.channel = channel;
    }

    public void SetColor(int color) {
        this.color = color;
    }

    public void SetSeat(int sequence) {
        this.seat = sequence;
        this.sequence = sequence;
    }

    public void setSequence(int sequence) {
        this.sequence = sequence;
    }

    public PlayerInfo GetPlayerInfo() {
        return new PlayerInfo(this);
    }
}
